﻿using BCCommon;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace BCDto.Website.User
{
    /// <summary>
    /// 修改密码
    /// </summary>
    public class UserPutChangePasswordDto
    {

        /// <summary>
        /// 密码
        /// </summary>
        [Display(Name = "原始密码")]
        [Required(ErrorMessage = "{0} 不能为空。")]
        [StringLength(16, ErrorMessage = "{0} 长度为 {2} 到 {1} 个字符", MinimumLength = 8)]
        [RegularExpression(RegexPatterns.PASSWORD, ErrorMessage = "{0} 需包含字母和数字")]
        public string Password { get; set; }
        /// <summary>
        /// 新密码
        /// </summary>
        [Display(Name = "新密码")]
        [Required(ErrorMessage = "{0} 不能为空。")]
        [StringLength(16, ErrorMessage = "{0} 长度为 {2} 到 {1} 个字符", MinimumLength = 8)]
        [RegularExpression(RegexPatterns.PASSWORD, ErrorMessage = "{0} 需包含字母和数字")]
        public string NewPassword { get; set; }

        /// <summary>
        /// 确认新密码
        /// </summary>
        [Display(Name = "确认新密码")]
        [Required(ErrorMessage = "{0} 不能为空。")]
        [StringLength(16, ErrorMessage = "{0} 长度为 {2} 到 {1} 个字符", MinimumLength = 8)]
        [RegularExpression(RegexPatterns.PASSWORD, ErrorMessage = "{0} 需包含字母和数字")]
        public string ReNewPassword { get; set; }
    }
}
